using System;

namespace ActiveSupport.Conversions
{
    // TODO: need to fix these to be localizable
    public static class StringConversionExtensions
    {
        public static DateTime ToDate(this string text)
        {
            return ToDateTime(text);
        }

        public static DateTime ToTime(this string text)
        {
            return ToDateTime(text);
        }

        public static DateTime ToDateTime(this string text)
        {
            return DateTime.Parse(text);
        }

        public static string[] ToArray(this string stringWithSpaces)
        {
            return stringWithSpaces.Split(' ');
        }
    }
}